package com.aidex.system.service;

import com.aidex.common.core.domain.TreeNode;
import com.aidex.common.core.domain.entity.SysMenu;
import com.aidex.common.core.service.BasicTreeService;
import com.aidex.system.domain.vo.RouterVo;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

import java.util.List;
import java.util.Set;

public interface SysMenuService extends BasicTreeService<SysMenu> {

    Set<String> selectMenuPermsByUserId(String userId);

    List<String> selectMenuIdsByRoleId(String roleId);

    List<RouterVo> buildMenus(List<SysMenu> menus);

    List<TreeNode> buildMenusTree(List<SysMenu> menus);

    List<SysMenu> selectList(QueryWrapper<SysMenu> wrapper, String userId);

    boolean hasChildByMenuId(String menuId);

    boolean checkMenuExistRole(String menuId);

    void checkMenuNameUnique(SysMenu menu);

    void checkMenuCodeUnique(SysMenu menu);

    boolean hasChildByDeptId(String sysMenuId);

}
